
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 育聘智联</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body {
            min-height: 100vh;
            margin: 0;
            background: linear-gradient(120deg, #eaf4fb 0%, #f5f7fa 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
        }
        .container {
            max-width: 480px;
            width: 98vw;
            margin: 0 auto;
            background: #fff;
            border-radius: 32px;
            box-shadow: 0 8px 40px rgba(0,113,227,0.18);
            padding: 56px 48px 40px 48px;
            position: relative;
            animation: fadeIn 0.8s cubic-bezier(.77,.2,.25,1);
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(40px); }
            to { opacity: 1; transform: none; }
        }
        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: 800;
            color: #005fa3;
            margin-bottom: 38px;
            letter-spacing: 2px;
        }
        .logo i {
            margin-right: 14px;
            font-size: 36px;
            color: #6ec6ff;
            filter: drop-shadow(0 2px 8px #00c6fb44);
        }
        h2 {
            text-align: center;
            font-size: 36px;
            font-weight: 900;
            margin-bottom: 36px;
            color: #005fa3;
            letter-spacing: 1px;
        }
        .form-group {
            margin-bottom: 28px;
        }
        label {
            display: block;
            margin-bottom: 10px;
            color: #005fa3;
            font-weight: 700;
            font-size: 18px;
        }
        input[type="text"], input[type="password"] {
            width: 100%;
            padding: 18px 20px;
            border-radius: 16px;
            border: 1.5px solid #e0e0e0;
            font-size: 20px;
            background: #f7fbff;
            outline: none;
            transition: border-color 0.3s, box-shadow 0.3s;
            box-shadow: 0 2px 8px rgba(0,113,227,0.04);
        }
        input[type="text"]:focus, input[type="password"]:focus {
            border-color: #00c6fb;
            box-shadow: 0 0 0 2px #00c6fb33;
        }
        .btn {
            width: 100%;
            background: linear-gradient(90deg, #6ec6ff 0%, #0071e3 100%);
            color: #fff;
            border: none;
            padding: 18px;
            border-radius: 16px;
            font-size: 22px;
            font-weight: 800;
            cursor: pointer;
            margin-top: 16px;
            box-shadow: 0 4px 16px #0071e344;
            transition: background 0.3s, box-shadow 0.3s;
        }
        .btn:hover {
            background: linear-gradient(90deg, #0071e3 0%, #6ec6ff 100%);
            box-shadow: 0 8px 32px #00c6fb44;
        }
        .link {
            display: block;
            text-align: center;
            margin-top: 28px;
            color: #0071e3;
            text-decoration: none;
            font-weight: 700;
            font-size: 18px;
            letter-spacing: 1px;
        }
        .link:hover {
            text-decoration: underline;
            color: #005fa3;
        }
        .flash-area {
            margin-bottom: 24px;
        }
        .flash-msg {
            background: #f7fbff;
            color: #005fa3;
            padding: 16px 20px;
            border-radius: 10px;
            text-align: center;
            font-weight: 700;
            font-size: 18px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            margin-bottom: 8px;
            letter-spacing: 1px;
        }
    </style>
</head>
<body>
    <div class="logo">
        <i class="fas fa-graduation-cap"></i>育聘智联
    </div>
    <div style="text-align:center;margin-bottom:18px;">
        <span style="font-size:20px;font-weight:700;color:#0071e3;letter-spacing:1px;">让人才与企业高效匹配</span>
        <span style="display:inline-block;background:linear-gradient(90deg,#0071e3 0%,#00c6fb 100%);border-radius:8px;padding:2px 12px;margin-left:10px;color:#fff;font-size:16px;font-weight:600;">品牌专属</span>
    </div>
    <div class="container">
                <h2>账号登录</h2>
                {% with messages = get_flashed_messages() %}
                    {% if messages %}
                        <div class="flash-area">
                            {% for msg in messages %}
                                <div class="flash-msg">{{ msg }}</div>
                            {% endfor %}
                        </div>
                    {% endif %}
                {% endwith %}
                <form method="post">
            <div class="form-group">
                <label for="username"><i class="fas fa-user"></i> 用户名</label>
                <input type="text" id="username" name="username" required autocomplete="username">
            </div>
            <div class="form-group">
                <label for="password"><i class="fas fa-lock"></i> 密码</label>
                <input type="password" id="password" name="password" required autocomplete="current-password">
            </div>
            <div class="form-group" style="margin-bottom:18px;">
                <input type="checkbox" id="rememberMe" style="vertical-align:middle;" />
                <label for="rememberMe" style="display:inline;font-size:16px;font-weight:500;color:#0071e3;vertical-align:middle;">记住账号和密码</label>
            </div>
            <button type="submit" class="btn"><i class="fas fa-sign-in-alt"></i> 登录</button>
                </form>
                <a href="/register" class="link"><i class="fas fa-user-plus"></i> 没有账号？立即注册</a>
        <div style="margin-top:38px;text-align:center;">
            <img src="/static/微信图片_2025-08-24_230658_822.jpg" alt="育聘智联LOGO" style="height:38px;margin-bottom:8px;filter:drop-shadow(0 2px 8px #00c6fb44);">
            <div style="font-size:15px;color:#0071e3;font-weight:600;letter-spacing:1px;">育聘智联 · 智慧招聘平台</div>
        </div>

        <footer style="margin-top:32px;text-align:center;color:#aaa;font-size:14px;">
            &copy; 2025 育聘智联 YPZL. All Rights Reserved.
        </footer>
    </div>
    <script>
    // 登录记住账号和密码
    window.onload = function() {
        // 自动填充
        if(localStorage.getItem('ypzl_username')) {
            document.getElementById('username').value = localStorage.getItem('ypzl_username');
        }
        if(localStorage.getItem('ypzl_password')) {
            document.getElementById('password').value = localStorage.getItem('ypzl_password');
        }
        if(localStorage.getItem('ypzl_rememberMe') === 'true') {
            document.getElementById('rememberMe').checked = true;
        }
    };
    document.querySelector('form').addEventListener('submit', function() {
        var remember = document.getElementById('rememberMe').checked;
        if(remember) {
            localStorage.setItem('ypzl_username', document.getElementById('username').value);
            localStorage.setItem('ypzl_password', document.getElementById('password').value);
            localStorage.setItem('ypzl_rememberMe', 'true');
        } else {
            localStorage.removeItem('ypzl_username');
            localStorage.removeItem('ypzl_password');
            localStorage.setItem('ypzl_rememberMe', 'false');
        }
    });
    </script>
</body>
</html>
